Ext.define('Admin.view.gooutDefend.GooutDefendGrid', {
    extend: Ext.grid.Panel,
    xtype: 'gooutDefendGrid',
    title: '\x3cb\x3e记录返回时间\x3c/b\x3e',
    id: 'gooutDefendGrid',
    bind: '{gooutDefendLists}',

    listeners: {
        itemdblclick: function (me, record, item, index, e, eOpts) {
            var gooutWindow = Ext.widget('gooutSAWindow', {
                title: '查看外出申请信息',
                items: {
                    xtype: 'gooutReadForm'
                }
            });
            gooutWindow.down('form').getForm().loadRecord(record);
        }
    },
    columns: [{
            text: '员工工号',
            sortable: true,
            dataIndex: 'number',
            width: 120
    },

        {
            text: '姓名',
            sortable: true,
            dataIndex: 'name',
            width: 120
    }, {
            text: '外出日期',
            sortable: true,
            dataIndex: 'goOutDate',
            width: 100,
            renderer: Ext.util.Format.dateRenderer('Y/m/d')
    }, {
            text: '外出时间',
            sortable: true,
            dataIndex: 'goOutTime',
            width: 100
    }, {
            text: '返回日期',
            sortable: true,
            dataIndex: 'goBackDate',
            width: 100,
            renderer: Ext.util.Format.dateRenderer('Y/m/d')
    }, {
            text: '返回时间',
            sortable: true,
            dataIndex: 'goBackTime',
            width: 100
    }, {
            text: '申请状态',
            sortable: true,
            dataIndex: 'applyState',
            width: 125
    }, {
            xtype: 'actioncolumn',
            items: [{
                xtype: 'button',
                iconCls: 'x-fa fa-pencil',
                handler: 'itemclick',
                tooltip: '记录返回时间'
        }],
            cls: 'content-column',
            width: 120,
            dataIndex: 'bool',
            text: '操作',

    }],
    bbar: Ext.create('Ext.PagingToolbar', {
        bind: '{gooutDefendLists}',
        displayInfo: true,
        displayMsg: '显示第 {0} - {1} 条数据 总计 {2}',
        emptyMsg: "没有任何数据"
    })
});
